using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_ICItemDesignMap : EntityTypeConfiguration<t_ICItemDesign>
    {
        public t_ICItemDesignMap()
        {
            // Primary Key
            this.HasKey(t => t.FItemID);

            // Properties
            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FChartNumber)
                .HasMaxLength(255);

            this.Property(t => t.FVersion)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("t_ICItemDesign");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FChartNumber).HasColumnName("FChartNumber");
            this.Property(t => t.FIsKeyItem).HasColumnName("FIsKeyItem");
            this.Property(t => t.FMaund).HasColumnName("FMaund");
            this.Property(t => t.FGrossWeight).HasColumnName("FGrossWeight");
            this.Property(t => t.FNetWeight).HasColumnName("FNetWeight");
            this.Property(t => t.FCubicMeasure).HasColumnName("FCubicMeasure");
            this.Property(t => t.FLength).HasColumnName("FLength");
            this.Property(t => t.FWidth).HasColumnName("FWidth");
            this.Property(t => t.FHeight).HasColumnName("FHeight");
            this.Property(t => t.FSize).HasColumnName("FSize");
            this.Property(t => t.FVersion).HasColumnName("FVersion");
        }
    }
}
